home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xaw / togglep.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  3KB  |  106 lines

  1. /*
  2.  * $XConsortium: ToggleP.h,v 1.8 91/06/20 16:15:51 converse Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23.  
  24. /* 
  25.  * ToggleP.h - Private definitions for Toggle widget
  26.  * 
  27.  * Author: Chris D. Peterson
  28.  *         MIT X Consortium
  29.  *         kit@expo.lcs.mit.edu
  30.  *  
  31.  * Date:   January 12, 1989
  32.  *
  33.  */
  34.  
  35. #ifndef _XawToggleP_h
  36. #define _XawToggleP_h
  37.  
  38. #include <X11/Xaw/Toggle.h>
  39. #include <X11/Xaw/CommandP.h>
  40.  
  41. /***********************************************************************
  42.  *
  43.  * Toggle Widget Private Data
  44.  *
  45.  ***********************************************************************/
  46.  
  47. #define streq(a, b) ( strcmp((a), (b)) == 0 )
  48.  
  49. typedef struct _RadioGroup {
  50.   struct _RadioGroup *prev, *next; /* Pointers to other elements in group. */
  51.   Widget widget;          /* Widget corrosponding to this element. */
  52. } RadioGroup;
  53.  
  54. /************************************
  55.  *
  56.  *  Class structure
  57.  *
  58.  ***********************************/
  59.  
  60.    /* New fields for the Toggle widget class record */
  61. typedef struct _ToggleClass  {
  62.     XtActionProc Set;
  63.     XtActionProc Unset;
  64.     XtPointer extension;
  65. } ToggleClassPart;
  66.  
  67.    /* Full class record declaration */
  68. typedef struct _ToggleClassRec {
  69.     CoreClassPart    core_class;
  70.     SimpleClassPart    simple_class;
  71.     LabelClassPart    label_class;
  72.     CommandClassPart    command_class;
  73.     ToggleClassPart     toggle_class;
  74. } ToggleClassRec;
  75.  
  76. extern ToggleClassRec toggleClassRec;
  77.  
  78. /***************************************
  79.  *
  80.  *  Instance (widget) structure 
  81.  *
  82.  **************************************/
  83.  
  84.     /* New fields for the Toggle widget record */
  85. typedef struct {
  86.     /* resources */
  87.     Widget      widget;
  88.     XtPointer   radio_data;
  89.  
  90.     /* private data */
  91.     RadioGroup * radio_group;
  92. } TogglePart;
  93.  
  94.    /* Full widget declaration */
  95. typedef struct _ToggleRec {
  96.     CorePart         core;
  97.     SimplePart         simple;
  98.     LabelPart         label;
  99.     CommandPart         command;
  100.     TogglePart       toggle;
  101. } ToggleRec;
  102.  
  103. #endif /* _XawToggleP_h */
  104.  
  105.  
  106.